# !/usr/bin python3
# encoding: utf-8 -*-
# @file     : grpc_client.py
# @author   : 沙陌 Matongxue_2
# @Time     : 2023/8/10 21:04
# @Copyright: 北京码同学
import grpc

from grpc_study import add_pb2_grpc, add_pb2


def run():
    with grpc.insecure_channel('127.0.0.1:33333') as channel:
        client = add_pb2_grpc.AddServiceStub(channel)
        result = client.add(add_pb2.AddRequest(a=8, b=11))
        print(result.res)


if __name__ == '__main__':
    run()
